#include "stdafx.h"
#include "Configuration.h"

Configuration::Configuration()
{
	configurationEnabled = false;

	maxSteps = 0;
	renderingEnabled = false;

	bufferSize =0;	
	diffusionDistanceEnabled = false;
	fileheadEnabled = false;
	orderParameterEnabled = false;
	positionVelocityEnabled = false;

	alignmentStrength = 0;
	alignmentType = 0;
	ballRadius = 0;
	boundaryType = 0;
	clusteringEnabled = false;
	clusterNum = 0;
	cohesionStrength = 0;
	cohesionType = 0;
	flockSize = 0;
	gridEnabled = false;
	initRange = 0;
	neighborNum = 0;
	neighborRange = 0;
	noiseStrength = 0;
	noiseType = 0;
	systemSize = 0;
	timeStep = 0;
	weightVelocity = 0;
	c_aS = 0;
	c_ra = 0;
	c_rb = 0;
	c_re = 0;
	c_rS = 0;
}

Configuration& Configuration::operator= (const Configuration& t)
{
	if( this != & t)
	{
		this->configurationEnabled = t.configurationEnabled;

		this->maxSteps = t.maxSteps;
		this->renderingEnabled = t.renderingEnabled;

		this->bufferSize = t.bufferSize;
		this->diffusionDistanceEnabled = t.diffusionDistanceEnabled;
		this->fileheadEnabled = t.fileheadEnabled;
		this->orderParameterEnabled = t.orderParameterEnabled;
		this->positionVelocityEnabled = t.positionVelocityEnabled;

		this->alignmentStrength = t.alignmentStrength;
		this->alignmentType = t.alignmentType;
		this->ballRadius = t.ballRadius;
		this->boundaryType = t.boundaryType;
		this->clusteringEnabled = t.clusteringEnabled;
		this->clusterNum = t.clusterNum;
		this->cohesionStrength = t.cohesionStrength;
		this->cohesionType = t.cohesionType;
		this->flockSize = t.flockSize;
		this->gridEnabled = t.gridEnabled;
		this->initRange = t.initRange;
		this->neighborNum = t.neighborNum;
		this->neighborRange = t.neighborRange;
		this->noiseStrength = t.noiseStrength;
		this->noiseType = t.noiseType;
		this->systemSize = t.systemSize;
		this->timeStep = t.timeStep;
		this->weightVelocity = t.weightVelocity;
		this->c_aS = t.c_aS;
		this->c_ra = t.c_ra;
		this->c_rb = t.c_rb;
		this->c_re = t.c_re;
		this->c_rS = t.c_rS;
	}
	return *this;
}

void Configuration::enableConfiguration()
{
	configurationEnabled = true;
}

void Configuration::reset()
{
	configurationEnabled = false;

	maxSteps = 0;	
	renderingEnabled = false;

	bufferSize =0;	
	diffusionDistanceEnabled = false;
	fileheadEnabled = false;
	orderParameterEnabled = false;
	positionVelocityEnabled = false;

	alignmentStrength = 0;
	alignmentType = 0;
	ballRadius = 0;
	boundaryType = 0;
	clusteringEnabled = false;
	clusterNum = 0;
	cohesionStrength = 0;
	cohesionType = 0;
	flockSize = 0;
	gridEnabled = false;
	initRange = 0;
	neighborNum = 0;
	neighborRange = 0;
	noiseStrength = 0;
	noiseType = 0;
	systemSize = 0;
	timeStep = 0;
	weightVelocity = 0;
	c_aS = 0;
	c_ra = 0;
	c_rb = 0;
	c_re = 0;
	c_rS = 0;
}
